import Vue from 'vue'
import VueRouter from 'vue-router'
import ZuiXin from '../pages/ZuiXin.vue'
import GuoNeiReDian from '../pages/GuoNeiReDian.vue'
import ChuangXinGongSi from '../pages/ChuangXinGongSi.vue'
import ShenDu from '../pages/ShenDu.vue'
import Register from '../pages/Register.vue'
import Login from '../pages/Login.vue'
import Detail from '../pages/guoneiredian/Detail.vue'

Vue.use(VueRouter);
export default new VueRouter({
    mode:"hash",
    routes:[
        {
            path:'/zuixin',
            component:ZuiXin,
            meta:{//路由元 每一个路由组件上都有一个对象 记录路由信息
                show:true
            }
        },{
            path:'/guoneiredian',
            component:GuoNeiReDian,
            meta:{
                show:true
            },
            children:[
                {
                    path:'/guoneiredian/detail/:index',
                    component:Detail
                }
            ]
        },{
            path:'/chuangxingongsi',
            component:ChuangXinGongSi,
            meta:{
                show:true
            }
        },{
            path:'/shendu',
            component:ShenDu,
            meta:{
                show:true
            }
        },{
            path:'/register',
            component:Register
        },{
            path:'/login',
            component:Login
        },{
            path:'/',
            redirect:'/zuixin'
        }
    ]
})